
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <title>用户中心-我的文章</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://v3.bootcss.com/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <link href="/static/pc/cmgd.css" rel="stylesheet">
    <link href="/static/pc/style.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/pc/swiper.3.2.0.min.css">

    <link rel="stylesheet" type="text/css" href="/static/admin/webupload/webuploader.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/webupload/style.css">

    <!--[if lt IE 9]>
    <script src="http://v3.bootcss.com/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="http://v3.bootcss.com/assets/js/ie-emulation-modes-warning.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/layer/layer.js"></script>
    <script src="/static/admin/js/laypage/laypage.js"></script>
    <script src="/static/admin/js/laytpl/laytpl.js"></script>
    <link href="/static/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <script src="/static/pc/js/charts/highcharts.js"></script>
    <script src="/static/pc/js/charts/modules/exporting.js"></script>
    <style>
        .list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover{
            background: #fff;
            color: #2fab87;
            border-color:#f5f5f5;
            border-bottom: 0px;
        }
        .list-group-item:first-child {border-radius: 0px;   }
        .fa{padding-right: 15px;font-size:18px;}
        .list-group-item{font-size:16px; border-top:0px;border-bottom: 1px #f5f5f5 solid;padding-top:20px;padding-bottom:20px; padding-left: 40px;
            border-left:0px;            border-right:0px;}
        .panel-heading{background: #f5f5f5;}

        .panel-primary>.panel-heading {
            padding: 25px 0 20px 0px;
            color: #000;
            background-color: #fff;
            border-color: #fff;
            border-bottom: 1px #f5f5f5 solid;
        }
        .myinfo{
            padding: 25px 20px 20px 20px;
            border-bottom: 2px #ffb400 solid;
        }
        .table-bordered>thead>tr>th {
            border: 0px solid #ddd;
        }
        .btn-primary{
            background-color: #2fab87;
            border-color: #2fab87;
        }
        th{font-weight: normal;font-size: 15px;}
        td{font-size: 14px;}
        .table-bordered>tbody>tr>td  {
            border: 0px solid #ddd;
        }

        .table-bordered{border:0px;}
        .long-tr{border:0px;background: #f7f7f7;}

        .panel-primary {
            border-color: #fff;
        }

        body{background:#f5f5f5;}
        .col-xs-12, .col-sm-9{padding-left: 0px;}
        .vc{padding:5px 10px; background: #2fab87;border-radius: 5px;color: #fff; }
        .vc:hover{cursor:pointer;}
        #container {
            min-width: 310px;
            max-width: 800px;
            height: 400px;
            margin: 0 auto
        }
    </style>
</head>

<body>
{include file="public/header4" /}
<div class="container body_bg" style="margin-top:80px;">
    <div class="row row-offcanvas row-offcanvas-right">
        <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">
            <!--<div style="width: 100%;height:100px;padding-top: 20px;padding-left: 10px;background: #fff;" >-->
                <!--<div style="width:60px;float: left;margin-right:10px;">-->
                    <!--<img src="/uploads/face/{$member.head_img}" style="width: 60px;height: 60px;">-->
                <!--</div>-->
                <!--<div style="float: left;width: 178px;">-->
                    <!--<div style="width: 178px;overflow: hidden;padding-top: 3px;">{$member.nickname}</div>-->
                    <!--<div style="width: 178px;overflow: hidden;padding-top: 12px;">ID:{$member.account}</div>-->
                <!--</div>-->
            <!--</div>-->
            {include file="public/user_center" /}
        </div><!--/.sidebar-offcanvas-->
        <div class="col-xs-12 col-sm-9">

            <div class="panel panel-primary" style="padding-left: 30px; min-height: 850px;">
                <div class="panel-heading">
                    <span class="myinfo">数据统计</span>
                </div>

                <div style="padding: 20px 0;"><span class="vc" onclick="check(7)">7天</span> <span  class="vc" onclick="check(15)">15天</span> <span  class="vc" onclick="check(30)">30天</span>  </div>
                <div>

                    <div class="panel-body">
                        <div class="example-wrap">
                            <div class="example">
                                <table class="table table-bordered table-hover">
                                    <thead>
                                    <tr class="long-tr">
                                        <th width="20%">文章</th>
                                        <th width="20%">提交时间</th>
                                        <th width="20%">阅读数</th>
                                        <th width="20%">评论数</th>
                                    </tr>
                                    </thead>
                                    <script id="arlist" type="text/html">
                                        {{# for(var i=0;i<d.length;i++){  }}
                                        <tr class="long-td">
                                            <td>{{d[i].title}}</td>
                                            <td>{{d[i].create_time1}}</td>
                                            <td>{{d[i].views}}</td>
                                            <td>{{d[i].comment}}</td>
                                        </tr>

                                        {{# } }}
                                    </script>

                                    <tbody id="article_list"></tbody>
                                </table>


                            </div>
                        </div>
                    </div>
            </div>
        </div>
    </div><!--/row-->

    <hr>

    <input type="hidden" name="dd"  id="dd" value="1">
    <input type="hidden" name="tt"  id="tt" value="7">


    <footer  style="text-align: center;">
        <p>&copy; Company 2017</p>
    </footer>

</div><!--/.container-->


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="http://v3.bootcss.com/assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="http://v3.bootcss.com/examples/offcanvas/offcanvas.js"></script>
<script type="text/javascript">
    function Ajaxpage(day){

        $.getJSON('{:url("Article/danpian")}', {
            page: 1,day:day
        }, function(data){      //data是后台返回过来的JSON数据
            console.log(data);
            $(".spiner-example").css('display','none'); //数据加载完关闭动画
            if(data==''){
                $("#article_list").html('<td colspan="20" style="padding-top:10px;padding-bottom:10px;font-size:16px;text-align:center">暂无数据</td>');
            }else{

//              、  console.log(data.cqs);
//                rt = '['+data.cqs+']';
//                var mycars=new Array()
//                mycars = data.cqs;

//                tu(mycars);


                article_list(data.list); //模板赋值


//                laypage({
//                    cont: $('#AjaxPage'),//容器。值支持id名、原生dom对象，jquery对象,
//                    pages:'1',//总页数
//                    skip: true,//是否开启跳页
//                    skin: '#1AB5B7',//分页组件颜色
//                    groups: 3,//连续显示分页数
//                    jump: function(obj, first){
//
//
////                        $('#allpage').html('第'+ obj.curr +'页，共'+ obj.pages +'页');
//                    }
//                });
            }
        });
    }

    Ajaxpage(7);
    function article_list(list){

        var tpl = document.getElementById('arlist').innerHTML;
        laytpl(tpl).render(list, function(html){
            document.getElementById('article_list').innerHTML = html;
        });
    }

    function urlto(id){
        location.href = './index/id/'+id+'.html';
    }
    function gourlto(id){
        location.href = '/web/article/index/id/'+id+'.html';
    }

    function check(ddd){
        if(ddd==0){
            ddd = $('#dd').val();
        }else{
            $('#dd').val(ddd);
        }
        Ajaxpage(ddd);
    }





</script>


<!--<script type="text/javascript">-->
    <!--function tu(ct){-->
        <!--Highcharts.chart('container', {-->

            <!--title: {-->
                <!--text: ''-->
            <!--},-->

            <!--subtitle: {-->
                <!--text: ''-->
            <!--},-->

            <!--yAxis: {-->
                <!--title: {-->
                    <!--text: ''-->
                <!--}-->
            <!--},-->
            <!--legend: {-->
                <!--layout: 'vertical',-->
                <!--align: 'right',-->
                <!--verticalAlign: 'middle'-->
            <!--},-->

            <!--plotOptions: {-->
                <!--series: {-->
                    <!--pointStart: 1-->
<!--//                [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]-->
                <!--}-->
            <!--},-->

            <!--series: [{-->
                <!--name: '新增数量',-->
                <!--data: ct-->
            <!--}]-->

        <!--});-->
    <!--}-->

<!--</script>-->


</body>
</html>
